package com.langxin.erp.util.web;
import java.text.DateFormat;
import java.text.SimpleDateFormat;

import org.springframework.stereotype.Component;

import com.fasterxml.jackson.databind.ObjectMapper;

/**
 * 用于注入Spring MVC的json转换器
 */
@Component("jacksonObjectMapper")
public class JacksonObjectMapper extends ObjectMapper {

	private static final long serialVersionUID = 1L;

	public JacksonObjectMapper() {
		DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		this.setDateFormat(format);
	}
}
